Optimal. Leaf size=43 \[ \frac {a^2 x^3}{3}+\frac {2 a b x^{n+3}}{n+3}+\frac {b^2 x^{2 n+3}}{2 n+3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {270} \[ \frac {a^2 x^3}{3}+\frac {2 a b x^{n+3}}{n+3}+\frac {b^2 x^{2 n+3}}{2 n+3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 270
Rubi steps
\begin {align*} \int x^2 \left (a+b x^n\right )^2 \, dx &=\int \left (a^2 x^2+b^2 x^{2 (1+n)}+2 a b x^{2+n}\right ) \, dx\\ &=\frac {a^2 x^3}{3}+\frac {2 a b x^{3+n}}{3+n}+\frac {b^2 x^{3+2 n}}{3+2 n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 40, normalized size = 0.93 \[ \frac {1}{3} x^3 \left (a^2+\frac {6 a b x^n}{n+3}+\frac {3 b^2 x^{2 n}}{2 n+3}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.90, size = 78, normalized size = 1.81 \[ \frac {3 \, {\left (b^{2} n + 3 \, b^{2}\right )} x^{3} x^{2 \, n} + 6 \, {\left (2 \, a b n + 3 \, a b\right )} x^{3} x^{n} + {\left (2 \, a^{2} n^{2} + 9 \, a^{2} n + 9 \, a^{2}\right )} x^{3}}{3 \, {\left (2 \, n^{2} + 9 \, n + 9\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.17, size = 91, normalized size = 2.12 \[ \frac {3 \, b^{2} n x^{3} x^{2 \, n} + 12 \, a b n x^{3} x^{n} + 2 \, a^{2} n^{2} x^{3} + 9 \, b^{2} x^{3} x^{2 \, n} + 18 \, a b x^{3} x^{n} + 9 \, a^{2} n x^{3} + 9 \, a^{2} x^{3}}{3 \, {\left (2 \, n^{2} + 9 \, n + 9\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 48, normalized size = 1.12 \[ \frac {2 a b \,x^{3} {\mathrm e}^{n \ln \relax (x )}}{n +3}+\frac {b^{2} x^{3} {\mathrm e}^{2 n \ln \relax (x )}}{2 n +3}+\frac {a^{2} x^{3}}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.63, size = 41, normalized size = 0.95 \[ \frac {1}{3} \, a^{2} x^{3} + \frac {b^{2} x^{2 \, n + 3}}{2 \, n + 3} + \frac {2 \, a b x^{n + 3}}{n + 3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.31, size = 43, normalized size = 1.00 \[ \frac {a^2\,x^3}{3}+\frac {b^2\,x^{2\,n}\,x^3}{2\,n+3}+\frac {2\,a\,b\,x^n\,x^3}{n+3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.92, size = 211, normalized size = 4.91 \[ \begin {cases} \frac {a^{2} x^{3}}{3} + 2 a b \log {\relax (x )} - \frac {b^{2}}{3 x^{3}} & \text {for}\: n = -3 \\\frac {a^{2} x^{3}}{3} + \frac {4 a b x^{\frac {3}{2}}}{3} + b^{2} \log {\relax (x )} & \text {for}\: n = - \frac {3}{2} \\\frac {2 a^{2} n^{2} x^{3}}{6 n^{2} + 27 n + 27} + \frac {9 a^{2} n x^{3}}{6 n^{2} + 27 n + 27} + \frac {9 a^{2} x^{3}}{6 n^{2} + 27 n + 27} + \frac {12 a b n x^{3} x^{n}}{6 n^{2} + 27 n + 27} + \frac {18 a b x^{3} x^{n}}{6 n^{2} + 27 n + 27} + \frac {3 b^{2} n x^{3} x^{2 n}}{6 n^{2} + 27 n + 27} + \frac {9 b^{2} x^{3} x^{2 n}}{6 n^{2} + 27 n + 27} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________